package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysPackageProductMapper;
import com.ruoyi.system.domain.SysPackageProduct;
import com.ruoyi.system.service.ISysPackageProductService;

/**
 * 套餐商品关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-22
 */
@Service
public class SysPackageProductServiceImpl implements ISysPackageProductService 
{
    @Autowired
    private SysPackageProductMapper sysPackageProductMapper;

    /**
     * 查询套餐商品关联
     * 
     * @param id 套餐商品关联主键
     * @return 套餐商品关联
     */
    @Override
    public SysPackageProduct selectSysPackageProductById(Long id)
    {
        return sysPackageProductMapper.selectSysPackageProductById(id);
    }

    /**
     * 查询套餐商品关联列表
     * 
     * @param sysPackageProduct 套餐商品关联
     * @return 套餐商品关联
     */
    @Override
    public List<SysPackageProduct> selectSysPackageProductList(SysPackageProduct sysPackageProduct)
    {
        return sysPackageProductMapper.selectSysPackageProductList(sysPackageProduct);
    }

    /**
     * 新增套餐商品关联
     * 
     * @param sysPackageProduct 套餐商品关联
     * @return 结果
     */
    @Override
    public int insertSysPackageProduct(SysPackageProduct sysPackageProduct)
    {
        return sysPackageProductMapper.insertSysPackageProduct(sysPackageProduct);
    }

    /**
     * 修改套餐商品关联
     * 
     * @param sysPackageProduct 套餐商品关联
     * @return 结果
     */
    @Override
    public int updateSysPackageProduct(SysPackageProduct sysPackageProduct)
    {
        return sysPackageProductMapper.updateSysPackageProduct(sysPackageProduct);
    }

    /**
     * 批量删除套餐商品关联
     * 
     * @param ids 需要删除的套餐商品关联主键
     * @return 结果
     */
    @Override
    public int deleteSysPackageProductByIds(Long[] ids)
    {
        return sysPackageProductMapper.deleteSysPackageProductByIds(ids);
    }

    /**
     * 删除套餐商品关联信息
     * 
     * @param id 套餐商品关联主键
     * @return 结果
     */
    @Override
    public int deleteSysPackageProductById(Long id)
    {
        return sysPackageProductMapper.deleteSysPackageProductById(id);
    }
}
